/*************************************************************************
	> File Name: symbol.h
	> Author: ma6174
	> Mail: ma6174@163.com 
	> Created Time: 2021年11月15日 星期一 22时42分07秒
 ************************************************************************/

#include "operation.h"

class Add : public Operation
{
public:
	using Operation::Operation;
	virtual double getResult()
	{
		return getA() + getB();
	}
};


class Sub : public Operation
{
public:
	using Operation::Operation;
	virtual double getResult()
	{
		return getA() - getB();
	}
};

class Mul : public Operation
{
public:
	using Operation::Operation;
	virtual double getResult()
	{
		return getA() * getB();
	}
};

class Div : public Operation
{
public:
	using Operation::Operation;
	virtual double getResult()
	{
		return getA() / getB();
	}
};
